package com.carl.utils;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class Result {

    private String code;

    private String msg;

    private Object data;

    public Result successResult(String message , Object data) {
        Result result = new Result();
        result.setMsg(message);
        result.setCode("200");
        result.setData(data);
        return result;
    }

    public static Result failReturn(String mess, Object data) {
        Result result = new Result();
        result.setCode("400");
        result.setData(data);
        result.setMsg(mess);
        return result;
    }



}
